Step 7: Analysis & Visualization

Analyze psychological data and create research-quality visualizations

🎯 Goal: Complete Research Analysis Workflow

This step teaches you to analyze psychology experiment data like a researcher. You'll learn to organize data, conduct focused analyses, and create clear visualizations that tell your research story.

What You'll Learn:

📁 Step 1: Organize Your Data

Before analysis, collect all your experimental results into a single, organized directory. This ensures standardized data and makes analysis much easier.

🗂️ Data Collection Checklist

Create a single folder called "experiment-data" and collect:

  • Raw Data Files: All participant data from your experiments (JSON files from Step 6)
  • Configuration File: Your experiment settings from Step 5 (config.json)
  • Study Documentation: Copy of your research plan from Step 0
  • Metadata: Notes about when/how data was collected
experiment-data/ ├── raw-data/ │ ├── participant_001_data.json │ ├── participant_002_data.json │ └── ... ├── config.json (from Step 5) ├── study-plan.md (from Step 0) └── collection-notes.txt

🔍 Data Standardization

Ensure all your data files have the same structure. Use this prompt to locate and fix any inconsistencies, being sure to include the relevant files in context:

AI Prompt: Standardize Data Structure

I have multiple experimental data files that need standardization. Please help me:

  • Check if all files have consistent data structure
  • Create a validation function to identify any problematic files
  • Write a script to standardize the format across all files
  • Generate a summary of the total dataset (number of participants, trials, etc.)

📊 Step 2: First Analysis - Core Research Question

Start with the most important analysis first. Use AI with full context from your previous steps to focus on your main research question.

🧠 Context-Rich Analysis Prompt

This prompt uses everything from your previous steps to guide focused analysis:

📋 Prerequisites

Ensure these files are included as context when running the prompt below.

AI Prompt: Primary Research Analysis

Based on my research question in study-plan.md, please analyze my experimental data and highlight the ONE most important finding. Provide:

  1. Simple Statistical Test: The most appropriate test for my main hypothesis
  2. Clear Visualization: One chart that shows the key finding
  3. Effect Size: How big/meaningful is this effect?
  4. Simple Interpretation: What this means for the research question

Keep this analysis focused and simple — we'll add complexity later.

📝 Create Your First Results Page

After running the analysis, create a simple HTML page to display your results:

AI Prompt: Create Results Page

Create a clean, professional HTML page called "results.html" that presents my analysis findings. Include:

  • Title & Research Question: Clear statement of what was tested
  • Key Finding: The main result in simple language
  • Visualization: Interactive chart showing the result
  • Statistical Details: Test statistic, p-value, effect size
  • Interpretation: What this means for the research question

Use clean CSS styling and make it look professional but not overwhelming.

Include the analysis output from the previous prompt as context in Cursor.

📈 Step 3: Build on Your Analysis

Now that you have your core finding, add depth with additional analyses that support and expand your story.

🔍 Secondary Analysis Prompt

AI Prompt: Expand Analysis

Based on my primary analysis results, help me explore additional questions that support my main finding:

Include as context: The results from my primary analysis prompt and my original data files.

Additional analyses to consider:

  • Individual Differences: Are there different patterns across participants?
  • Time Course: How do results change over the course of the experiment?
  • Condition Comparisons: How do different experimental conditions compare?
  • Robustness: Do results hold with different analysis approaches?

Choose 1-2 additional analyses that would be most informative for my research question. Create visualizations and statistical tests for each.

🎨 Visualization Enhancement

AI Prompt: Professional Visualizations

Create publication-quality visualizations for my research findings. I need:

  • Main Finding Chart: Professional version of my core result
  • Individual Data: Show individual participant data alongside group means
  • Effect Size Visualization: Clear display of practical significance
  • Proper Statistics: Error bars, confidence intervals, sample sizes

Use Chart.js or similar library, with clean styling and appropriate colors. Include proper labels, legends, and statistical annotations.

Include my data files and previous analysis results as context in Cursor.

🧠 Step 4: Advanced Analysis (Optional)

For more sophisticated research, add computational modeling or advanced statistical techniques.

🔬 ELPH Model Analysis

While a version of the ELPH model was used as an adaptive opponent in Step 6, its primary scientific purpose is for post-hoc analysis of participant data, which is what we focus on here.

AI Prompt: Computational Modeling

Implement ELPH computational modeling for post-hoc analysis of my participant data:

Context: Based on Mohammadi Sepahvand et al. (2014) - ELPH models statistical learning in sequential decisions

Include as context:

  • study-plan.md (research design from Step 0)
  • Sample participant data files with choice sequences

Analysis Goals:

  • Fit ELPH model to individual participant choice sequences
  • Estimate learning parameters (memory length, entropy threshold)
  • Compare model fit across participants/conditions
  • Identify different learning strategies used by participants

Provide implementation code and analysis of which participants show evidence of statistical learning vs. random responding.

📊 Advanced Statistical Tests

AI Prompt: Advanced Statistics

Apply advanced statistical techniques appropriate for my research design:

Include as context:

  • study-plan.md (study design from Step 0)
  • Results from my primary analysis
  • My experimental data files

Advanced techniques to consider:

  • Mixed-Effects Models: Account for individual differences and repeated measures
  • Bayesian Analysis: Use prior knowledge and uncertainty quantification
  • Machine Learning: Classification or prediction of participant strategies
  • Time Series Analysis: Changes in behavior over time

Choose the most appropriate advanced technique for my data and research question. Provide implementation and interpretation.

✅ Step 7 Checklist

🎯 Next Steps: Share Your Research

Congratulations! You've completed a full research cycle. Consider: